package com.eduadmin.service;

import com.eduadmin.entity.TeamCourseAve;
import com.eduadmin.mapper.TeamCourseAveMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TeamCourseAveServiceImpl implements ITeamCourseAveService{
    private final TeamCourseAveMapper teamCourseAveMapper;
    @Autowired
    public TeamCourseAveServiceImpl(TeamCourseAveMapper teamCourseAveMapper) {
        this.teamCourseAveMapper = teamCourseAveMapper;
    }
    @Override
    public int batchInsert(List<TeamCourseAve> teamCourseAveList){
        teamCourseAveMapper.batchInsert(teamCourseAveList);
        return 1;
    }
    public List<TeamCourseAve> getQueTeamCourseAve(Map<String,Object> paraMap){
        return teamCourseAveMapper.getQueTeamCourseAve(paraMap);
    }
    // 根据条件（学期&&年级&&考试&&分类）删除所有的班级学科平均分，返回1
    public int deleteByParams(Map<String,Object> paraMap){
        teamCourseAveMapper.deleteByParams(paraMap);
        return 1;
    }
    // 按条件查询班级学科平均分记录的条数
    public int getTeamCourseAveNumberByParams(Map<String,Object> paraMap){
        return teamCourseAveMapper.getTeamCourseAveNumberByParams(paraMap);
    }
}
